﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Logoned.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="CourseSystem.Common.Helpers" %>
<%@ Import Namespace="CourseSystem.Core.BLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    首页
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
        <% Html.RenderPartial("TopUc"); %>
        <% Html.RenderPartial("NavUc", 0); %>
        <tr>
            <td height="25" bgcolor="#98c1e1">
            </td>
        </tr>
    </table>
    <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td height="200" background="<%=ResolveUrl("~/Content/images/4_17b.jpg") %>" bgcolor="#FFFFFF">
                <table width="1000" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="3" height="488">
                        </td>
                        <td width="242" align="right" valign="top">
                            <table width="225" height="488" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td width="225" height="488" valign="top">
                                        <table width="222" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td height="37" background="<%=ResolveUrl("~/Content/images/3_18.jpg") %>">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td height="132" align="center" valign="top" background="<%=ResolveUrl("~/Content/images/3_20.jpg") %>">
                                                    <table width="180" border="0" cellspacing="0" cellpadding="0">
                                                        <tr>
                                                            <td height="10">
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <div align="left">
                                                                    <span class="style2"><strong>
                                                                        <%=UserHelper.LoginUser.UserName %></strong>，您好！欢迎登录<%=CourseSettingBLL.Get().CourseName %>网络课程学习！</span></div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="10">
                                                            </td>
                                                        </tr>
                                                        <%if ((int)UserHelper.LoginUser.UserType == 1)
                                                          {
                                                              if (!string.IsNullOrEmpty(UserHelper.Student.LastUrl) && !UserHelper.Student.IsCanUpLastUrl)
                                                              {%>
                                                        <tr>
                                                            <td>
                                                                <div align="left">
                                                                    <span class="style3"><a href="<%=Url.Action("ViewLastUrl","Account") %>">继续上次学习</a></span></div>
                                                            </td>
                                                        </tr>
                                                        <%} %>
                                                        <tr>
                                                            <td height="24" class="style1">
                                                                <div align="left">
                                                                    您的最终评分：<span class="style3"><%=ExamSummaryBLL.GetTypeCount(UserHelper.LoginUser.Id, 4) < 1 ? " " : ScoreHelper.GetTotalScore(UserHelper.Student).ToString()%>分</span>
                                                                    <% if (!string.IsNullOrEmpty(UserHelper.Student.Comment))
                                                                       {%>
                                                                    <a onclick="view2ClickA('<%=UserHelper.Student.Id %>')" href="javascript:;">评语</a><%}  %></div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <div align="left">
                                                                    <span class="style2">您共进入系统学习<span class="style4"><%=UserHelper.Student.LearnTimes%></span>次</span></div>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td height="10">
                                                            </td>
                                                        </tr>
                                                        <%} %>
                                                        <%if ((int)UserHelper.LoginUser.UserType > 0)
                                                          {%>
                                                        <tr>
                                                            <td>
                                                                <div align="left">
                                                                    <span class="style5"><a id="changeA" href="javascript:void(0);;">修改密码</a></span>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                        <%} %>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td height="9" background="<%=ResolveUrl("~/Content/images/3_22.jpg") %>">
                                                </td>
                                            </tr>
                                        </table>
                                        <table width="222" height="10" border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td>
                                                </td>
                                            </tr>
                                        </table>
                                        <% Html.RenderAction("ResourcesListUc"); %>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td width="15">
                        </td>
                        <td width="475" align="left" valign="top">
                            <% Html.RenderAction("NewsListUc"); %>
                           <% Html.RenderAction("TeacherListUc"); %>
                        </td>
                        <td width="22" valign="top">
                        </td>
                        <td width="243" valign="top">
                            <% Html.RenderAction("QuestionListUc"); %>
                        </td>
                    </tr>
                </table>
                <table width="1000" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td align="center" valign="top">
                            <% Html.RenderAction("VideoListUc"); %>
                            <table width="950" height="20" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td>
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <div id="editDiv" title="修改密码">
    </div>
    <div id="viewDiv" title="查看问题">
    </div>
    <div id="view2Div" title="查看评语">
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
    <script type="text/javascript">
        $(function () {
            $("#editDiv").dialog({
                autoOpen: false,
                height: 350,
                width: 450,
                modal: true,
                close: function () {
                }
            });

            $("#changeA")
                .click(function () {
                    $("#editDiv").html("loading...");
                    $("#editDiv").load(appRoot + 'Account/ChangePass/');
                    $("#editDiv").dialog("open");
                });

            $("#viewDiv").dialog({
                autoOpen: false,
                height: 500,
                width: 550,
                modal: true,
                close: function () {
                }
            });
            $("#view2Div").dialog({
                autoOpen: false,
                height: 400,
                width: 450,
                modal: true,
                close: function () {
                }
            });
        });

        var viewClickA = function (id) {
            $("#viewDiv").html("loading...");
            $("#viewDiv").load(appRoot + 'Interaction/QuestionViewUc/' + id + '?trd=' + rdTime());
            $("#viewDiv").dialog("open");
        };


        var view2ClickA = function (id) {
            $("#viewDiv").html("loading...");
            $("#viewDiv").load(appRoot + 'Home/StudentViewUc/' + id + "?rn=" + rdTime());
            $("#viewDiv").dialog("open");
        };
    </script>
</asp:Content>
